A wide variety of sensors are used with computer systems. In particular, modem mobile phones include sensors such as accelerometers, gyroscopes, magnetometer compasses, and barometers.
Accelerometers in mobile phones, for example, may be used to detect the orientation and movement of the phone. The gyroscope adds an additional dimension to the information supplied by the accelerometer by tracking rotation or twist.
Magnetometer compasses can provide mobile phones with information regarding the orientation of the mobile phone in relation to the Earth's magnetic field. Mobile phones can use the magnetometer compasses to rotate digital maps depending on a user's physical orientation.
A barometer is a sensor that measures atmospheric pressure. Barometers can be used to determine the altitude of the mobile phone.
Data from such sensors can be accessed as requested by applications that are executing on the computer system. For example, applications can request that the sensor data be provided at a given interval to enable the application to provide various functions and services.